import table from '@/components/dt/table/render.js'
import Opt from '@/components/dt/info/Opt.js'

let _this = null;

class Columns extends Opt {
  constructor(vm) {
    super()
    _this = vm
    this.build()
  }

  build() {
    this.createAll()
    this.opts.push(...this.all)
  }
  chooseBox1() {
    let chooseBox = {
      type: 'checkbox',
      width: 60,
      align: 'center',
      fixed: 'left',
    }
    return chooseBox
  }
  createAll() {
    if (_this.check) {
      this.all = [{
        title: '渠道名称',
        field: 'channelName',
        minWidth: 120,
      }]
    } else {
      this.all = [this.chooseBox1(), {
        title: '渠道名称',
        field: 'channelName',
        minWidth: 120,
      }]
    }
  }

}
export default Columns